using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using NBear.IoC.Service;

public abstract class ServiceFactory
{
    private ServiceFactory()
    {
    }

    private static NBear.IoC.Service.ServiceFactory factory = null;

    public static IServiceInterfaceType GetService<IServiceInterfaceType>()
        where IServiceInterfaceType : IServiceInterface
    {
        if (factory == null)
        {
            factory = NBear.IoC.Service.ServiceFactory.Create();
        }
        return factory.GetService<IServiceInterfaceType>();
    }
}
